﻿@model DevWeb.Biztalk.DeploymentSettings.WebUI.Models.ParametersValuesModel

@{
    ViewBag.Title = "ParametersValues";
}

<h2>Create Or Edit Parameter Values</h2>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>ParametersValuesModel</legend>

        @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.LabelFor(model => model.ParameterName)
        </div>
        <div class="editor-field">
            @Html.DisplayTextFor(model => model.ParameterName)
         
        </div>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.DefaultValue)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DefaultValue)
         
        </div>
        <div>Environment Values:</div>
        @if (Model != null)
        {
            foreach (var item in Model.ParameterValues)
            {
                //Html.RenderPartial("_ParameterValue", item);
                @Html.Label(item.Environment + " Value:")
                ;
                @Html.TextBox(item.Environment, item.Value, new {id = item.Environment})
                ;

            }
        }
        
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}


@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
